package GUI;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class 系统管理界面 {
    private JFrame frame;
    private JPanel main;
    private JButton 售卡Button;
    private JButton 系统管理Button;
    private JButton 会员信息Button;
    private JButton 消费记录Button;
    private JButton 更改密码Button;
    private JButton 退出登录Button;
    private JButton 生成csv报表Button;

    public 系统管理界面() {

        会员信息Button.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent actionEvent) {
                new 会员信息界面().界面();
                frame.dispose();
            }
        });
        消费记录Button.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent actionEvent) {
                new 消费记录界面().界面();
                frame.dispose();
            }
        });
        退出登录Button.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent actionEvent) {
                new 管理员登陆界面().界面();
                frame.dispose();
            }
        });
        更改密码Button.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent actionEvent) {
                new 更改密码().界面();
            }
        });
        退出登录Button.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent actionEvent) {
                new 管理员登陆界面().界面();
                frame.dispose();
            }
        });
        生成csv报表Button.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent actionEvent) {
                new CSV报表界面().界面();
            }
        });
    }

    public static void main(String[] args) {
        界面();
    }
    public static void 界面(){
        系统管理界面 系统=new 系统管理界面();
        系统.frame=new JFrame("游泳管理系统");
        系统.frame.setContentPane(系统.main);
        系统.frame.setSize(500,400);
        系统.frame.setLocation(500, 200);
        系统.frame.setLocation(500, 200);
        系统.frame.setVisible(true);
        系统.frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
}
